The Cursor OSAX consists of a couple routines that I wrote one night to learn about
osaxen...it's pretty simple, and consists of 5 different appleEvents. They are:
HorizontalMouseLocation -- returns the horizontal position of the mouse
VerticalMouseLocation -- returns the vertical postition of the mouse
MouseDown -- returns a boolean. True if the mouse button currently pressed
MoveMouse {int, int} -- Move the cursor to the specified location...
PressButton -- Simluate a click of the mouse (doesn't work in
menus) would be really cool if someone spent
the time to figure this one out.
That's it, this osax is freeware, and I'd be happy to share the source code with anyone who wants it...it consists of 5 separate Metrowerks projects and is pretty simple. If you'd like the source code, or would like to email me about suggestions/improvments, you are welcome to send me an email message at milesm@uclink4.berkeley.edu.
About the source code:
The source code comes in five separate parts, one for each code osax code resource. Sorry if it's a little hard to decipher for non-programmers...notice that each project compiles to a separate OSAX and that you'll need to do a little ResEdit work to copy and paste all the osax resources into the final code. A couple of the files are incredibly small and simple, and some are a
little more complex.
If you have improvements or extra osaxen that you'd like to add to this collection, feel free to compile the osax and send it to me so that I can add
it to the entire project. I'm specifically looking for an impovement to the
"PressButton" osax so that it'll work in menus. Other ideas include a drag and
double-click osax, however, try as I might, I could not figure out how to manipulate the mouse in those ways via applescript. I think those things would be nice additions to this collection